package Controlador;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import Controlador.IngredientesC;
import Controlador.CategoriaC;
import Controlador.CompraIngredientesC;
import Controlador.ProductoC;
import Controlador.OrdenC;
import Vista.Menu;

public class MenuC implements ActionListener{
	private Menu Vmenu;
	public MenuC(){
		super();
		this.Vmenu = new Menu();
		this.Vmenu.setLocationRelativeTo(null);
		this.Vmenu.setVisible(true);	
		this.Vmenu.addListener(this);
		
	}
	public void actionPerformed(ActionEvent e) {
		String actionCommand = e.getActionCommand();
		 if (actionCommand.equals("Ingrediente")) {
			new IngredientesC();
		}
		else if (actionCommand.equals("Compra")) {
			new CompraIngredientesC();
		}
		else if (actionCommand.equals("Categoria")){
			new CategoriaC();
		}
		else if (actionCommand.equals("Orden")){
			new OrdenC();
		}
		else if (actionCommand.equals("Producto")){
			new ProductoC();
		}
  }
}